#ifndef INCLUDES_CHARREADER_H
#define INCLUDES_CHARREADER_H 1

#include <common/macro/build.h>

typedef struct charreader_t {
	char    *buffer;

	size_t content;
	size_t size;
} charreader_t;

API_LIBLOCAL charreader_t *charreader_new(void);
API_LIBLOCAL void charreader_flush(charreader_t *);
API_LIBLOCAL void charreader_destroy(charreader_t *);
API_LIBLOCAL int charreader_pushchar(charreader_t *, char);
API_LIBLOCAL int charreader_pushstring(charreader_t *, char *);
API_LIBLOCAL size_t charreader_getdatasize(const charreader_t *);
API_LIBLOCAL char *charreader_getstring(const charreader_t *);

#endif
